package qyf.example.eurekaclientelsaticsearch.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;
import qyf.example.eurekaclientelsaticsearch.entity.Article;

@Repository
public interface ArticleRepository extends ElasticsearchRepository<Article, Long> {

    Page<Article> findByContentOrTitleOrderByCreateTimeDesc(String content, String title, PageRequest pageRequest);
}
